Prevent which-key faces from over-extending during formatting
authorPhilip Kaludercic <philipk@posteo.net>
Tue, 18 Jun 2024 08:40:01 +0000 (10:40 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Tue, 18 Jun 2024 09:31:04 +0000 (11:31 +0200)
commite0190c4fb80182e4436f394213d46fafebc03469
tree27c6c35545513e38bea9c4c8a24e1515bbf0fdda
parente0871780ac44336a30e76abb91459cf5d0e5e6e2
Prevent which-key faces from over-extending during formatting

* lisp/which-key.el (which-key--pad-column): Instead of
injecting the description using a left-aligned format-string (%-[n]s),
we manually add the necessary padding so that the text
properties don't extend beyond the description.  This allows us
to use a face with a background without it extending until the
end of a column.

See also 63a6fb2a7a02ca88835c3fd473894d3b7d39ff15 for a similar
issue with Quick Help.
lisp/which-key.el